package com.ls.controller.orderrecord;

import cn.dev33.satoken.stp.StpUtil;
import com.ls.controller.orderrecord.model.OrderRecordModel;
import com.ls.controller.orderrecord.model.QueryOrderRecordModel;
import com.ls.entity.Customer;
import com.ls.service.IOrderRecordService;
import com.ls.utils.ResultData;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName OrderRecordAppController
 * @Description app订单记录
 *
 * @author pengyu
 * @since 2024-06-28
 */
@Api(value = "app订单记录", tags = "app订单记录")
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/orderRecordApp")
public class OrderRecordAppController {
    private final IOrderRecordService service;
    /** 分页查询订单记录 */
    @GetMapping("pageList")
    public ResultData pageList(OrderRecordModel model) {
        Long customerId = StpUtil.getLoginIdAsLong();
        model.setCustomerId(customerId);
        return service.pageListApp(model);
    }
}
